<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
<script>
	var a = ["测试一","测试二","测试三","测试四"];
	for(var i in a){
		console.log(i);
		console.log(a[i]);
	}

	var b = {索1:"测试一",索2:"测试2",索3:"测试三"};
	for(var i in b){
		console.log(i);
		console.log(b[i]);
	}

</script>
</body>
</html>